

<!doctype html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>skidl.schematics.sch_node module &#8212; SKiDL 2.2.0 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
    <link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=a66e137f" />
    
    <script src="../_static/documentation_options.js?v=b21de401"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/bizstyle.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!--[if lt IE 9]>
    <script src="_static/css3-mediaqueries.js"></script>
    <![endif]-->
  </head><body>
    <h1 id="site-title"><a href="../../../"><img src="../../../images/slim_banner.png" width="100%"></a></h1>
    
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.schematics.sch_node module</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-skidl.schematics.sch_node">
<span id="skidl-schematics-sch-node-module"></span><h1>skidl.schematics.sch_node module<a class="headerlink" href="#module-skidl.schematics.sch_node" title="Link to this heading">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.schematics.sch_node.</span></span><span class="sig-name descname"><span class="pre">SchNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">circuit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tool_module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filepath</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'.'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">top_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flatness</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="skidl.schematics.place.html#skidl.schematics.place.Placer" title="skidl.schematics.place.Placer"><code class="xref py py-class docutils literal notranslate"><span class="pre">Placer</span></code></a>, <a class="reference internal" href="skidl.schematics.route.html#skidl.schematics.route.Router" title="skidl.schematics.route.Router"><code class="xref py py-class docutils literal notranslate"><span class="pre">Router</span></code></a></p>
<p>Data structure for holding information about a node in the circuit hierarchy.</p>
<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.add_circuit">
<span class="sig-name descname"><span class="pre">add_circuit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">circuit</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.add_circuit"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.add_circuit" title="Link to this definition">¶</a></dt>
<dd><p>Add parts in circuit to node and its children.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>circuit</strong> (<a class="reference internal" href="skidl.circuit.html#skidl.circuit.Circuit" title="skidl.circuit.Circuit"><em>Circuit</em></a>) – Circuit object.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.add_part">
<span class="sig-name descname"><span class="pre">add_part</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">part</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.add_part"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.add_part" title="Link to this definition">¶</a></dt>
<dd><p>Add a part to the node at the appropriate level of the hierarchy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part</strong> (<a class="reference internal" href="skidl.part.html#skidl.part.Part" title="skidl.part.Part"><em>Part</em></a>) – Part to be added to this node or one of its children.</p></li>
<li><p><strong>level</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em>, </em><em>optional</em>) – The current level (depth) of the node in the hierarchy. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.add_terminal">
<span class="sig-name descname"><span class="pre">add_terminal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">net</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.add_terminal"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.add_terminal" title="Link to this definition">¶</a></dt>
<dd><p>Add a terminal for this net to the node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>net</strong> (<a class="reference internal" href="skidl.net.html#skidl.net.Net" title="skidl.net.Net"><em>Net</em></a>) – The net to be added to this node.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.calc_bbox">
<span class="sig-name descname"><span class="pre">calc_bbox</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.calc_bbox"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.calc_bbox" title="Link to this definition">¶</a></dt>
<dd><p>Compute the bounding box for the node in the circuit hierarchy.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.collect_stats">
<span class="sig-name descname"><span class="pre">collect_stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.collect_stats"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.collect_stats" title="Link to this definition">¶</a></dt>
<dd><p>Return comma-separated string with place &amp; route statistics of a schematic.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.external_bbox">
<span class="sig-name descname"><span class="pre">external_bbox</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.external_bbox"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.external_bbox" title="Link to this definition">¶</a></dt>
<dd><p>Return the bounding box of a hierarchical sheet as seen by its parent node.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.filename_sz">
<span class="sig-name descname"><span class="pre">filename_sz</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">20</span></em><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.filename_sz" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.find_node_with_part">
<span class="sig-name descname"><span class="pre">find_node_with_part</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">part</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.find_node_with_part"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.find_node_with_part" title="Link to this definition">¶</a></dt>
<dd><p>Find the node that contains the part based on its hierarchy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>part</strong> (<a class="reference internal" href="skidl.part.html#skidl.part.Part" title="skidl.part.Part"><em>Part</em></a>) – The part being searched for in the node hierarchy.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The Node object containing the part.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="skidl.node.html#skidl.node.Node" title="skidl.node.Node">Node</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.flatten">
<span class="sig-name descname"><span class="pre">flatten</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">flatness</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.flatten"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.flatten" title="Link to this definition">¶</a></dt>
<dd><p>Flatten node hierarchy according to flatness parameter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>flatness</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/functions.html#float" title="(in Python v3.13)"><em>float</em></a><em>, </em><em>optional</em>) – Degree of hierarchical flattening (0=completely hierarchical, 1=totally flat). Defaults to 0.0.</p>
</dd>
</dl>
<p>Create hierarchical sheets for the node and its child nodes. Complexity (or size) of a node
and its children is the total number of part pins they contain. The sum of all the child sizes
multiplied by the flatness is the number of part pins that can be shown on the schematic
page before hierarchy is used. The instances of each type of child are flattened and placed
directly in the sheet as long as the sum of their sizes is below the slack. Otherwise, the
children are included using hierarchical sheets. The children are handled in order of
increasing size so small children are more likely to be flattened while large, complicated
children are included using hierarchical sheets.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.get_internal_nets">
<span class="sig-name descname"><span class="pre">get_internal_nets</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.get_internal_nets"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.get_internal_nets" title="Link to this definition">¶</a></dt>
<dd><p>Return a list of nets that have at least one pin on a part in this node.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.get_internal_pins">
<span class="sig-name descname"><span class="pre">get_internal_pins</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">net</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.get_internal_pins"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.get_internal_pins" title="Link to this definition">¶</a></dt>
<dd><p>Return the pins on the net that are on parts in the node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>net</strong> (<a class="reference internal" href="skidl.net.html#skidl.net.Net" title="skidl.net.Net"><em>Net</em></a>) – The net whose pins are being examined.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of pins on the net that are on parts in this node.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)">list</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.get_or_add_child">
<span class="sig-name descname"><span class="pre">get_or_add_child</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.get_or_add_child"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.get_or_add_child" title="Link to this definition">¶</a></dt>
<dd><p>Get or create a child node with the given name and attach it to the parent node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>self</strong> (<a class="reference internal" href="skidl.node.html#skidl.node.Node" title="skidl.node.Node"><em>Node</em></a>) – The parent node.</p></li>
<li><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – Name of the child node.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The child node.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="skidl.node.html#skidl.node.Node" title="skidl.node.Node">Node</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.internal_bbox">
<span class="sig-name descname"><span class="pre">internal_bbox</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/sch_node.html#SchNode.internal_bbox"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.internal_bbox" title="Link to this definition">¶</a></dt>
<dd><p>Return the bounding box for the circuitry contained within this node.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="skidl.schematics.sch_node.SchNode.name_sz">
<span class="sig-name descname"><span class="pre">name_sz</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">40</span></em><a class="headerlink" href="#skidl.schematics.sch_node.SchNode.name_sz" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3><a href="../index.html">Table of Contents</a></h3>
    <ul>
<li><a class="reference internal" href="#">skidl.schematics.sch_node module</a><ul>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode"><code class="docutils literal notranslate"><span class="pre">SchNode</span></code></a><ul>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.add_circuit"><code class="docutils literal notranslate"><span class="pre">SchNode.add_circuit()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.add_part"><code class="docutils literal notranslate"><span class="pre">SchNode.add_part()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.add_terminal"><code class="docutils literal notranslate"><span class="pre">SchNode.add_terminal()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.calc_bbox"><code class="docutils literal notranslate"><span class="pre">SchNode.calc_bbox()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.collect_stats"><code class="docutils literal notranslate"><span class="pre">SchNode.collect_stats()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.external_bbox"><code class="docutils literal notranslate"><span class="pre">SchNode.external_bbox()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.filename_sz"><code class="docutils literal notranslate"><span class="pre">SchNode.filename_sz</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.find_node_with_part"><code class="docutils literal notranslate"><span class="pre">SchNode.find_node_with_part()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.flatten"><code class="docutils literal notranslate"><span class="pre">SchNode.flatten()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.get_internal_nets"><code class="docutils literal notranslate"><span class="pre">SchNode.get_internal_nets()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.get_internal_pins"><code class="docutils literal notranslate"><span class="pre">SchNode.get_internal_pins()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.get_or_add_child"><code class="docutils literal notranslate"><span class="pre">SchNode.get_or_add_child()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.internal_bbox"><code class="docutils literal notranslate"><span class="pre">SchNode.internal_bbox()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.sch_node.SchNode.name_sz"><code class="docutils literal notranslate"><span class="pre">SchNode.name_sz</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>

  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/rst_output/skidl.schematics.sch_node.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.schematics.sch_node module</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    &#169; Copyright 2016-2025, Dave Vandenbout.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
    </div>
  </body>
</html>